﻿using System.Linq;

namespace BankOcrDojo
{
    internal class SegmentZiffer
    {
        public string[] Zeilen { get; set; }

        public SegmentZiffer( string[] zeilen )
        {
            Zeilen = zeilen;
        }

        public bool Equals( SegmentZiffer other )
        {
            return Zeilen.SequenceEqual( other.Zeilen );
        }

        public override bool Equals( object obj )
        {
            return Equals( (SegmentZiffer)obj );
        }

        public override int GetHashCode()
        {
            return ( Zeilen != null ? string.Concat( Zeilen ).GetHashCode() : 0 );
        }
    }
}